#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

int main(int argc, char *argv[])
{
    int *p = malloc(sizeof(int));
    assert(p != NULL);

    printf("(%d) memeory address of P:%08x\n", getpid(), (unsigned)p);

    *p = 0;
    for (size_t i = 0; i < 10; i++)
    {
        sleep(1);
        *p = *p + 1;
        printf("(%d) P:%d\n", getpid(), *p);
    }

    return 0;
}
